/**
 * 
 */
package evolution;

import info.Course;

/**
 * @author vtkhanh
 * 
 */
public class Gene {

    private int mGeneId;
    private Course mCourse;
    private short mRoomId;
    private int mTimeslot;
    private int mCost = 0;
    private String mCostType = "";
    private boolean mModified = false; // check 'true' when gene is modified

    // copy constructor
    public Gene(Gene gene) {
	setGeneId(gene.getGeneId());
	setCourse(gene.getCourse());
	setRoomId(gene.getRoomId());
	setTimeslot(gene.getTimeslot());
	//setCost(gene.getCost());
    }

    public Gene(int geneId, Course course, short roomId, short timeslot) {
	setGeneId(geneId);
	setCourse(course);
	setRoomId(roomId);
	setTimeslot(timeslot);
    }

    public Course getCourse() {
	return mCourse;
    }

    public void setCourse(Course course) {
	mCourse = course;
    }

    public int getTimeslot() {
	return mTimeslot;
    }

    public void setTimeslot(int timeslot) {
	mTimeslot = timeslot;
    }

    public int getCost() {
	return mCost;
    }

    public void setCost(int cost) {
	this.mCost = cost;
    }

    public void addCost(int addition) {
	this.mCost = this.mCost + addition;
    }

    public int getGeneId() {
	return mGeneId;
    }

    public void setGeneId(int geneId) {
	mGeneId = geneId;
    }

    public short getRoomId() {
	return mRoomId;
    }

    public void setRoomId(short roomId) {
	mRoomId = roomId;
    }

    public boolean isModified() {
	return mModified;
    }

    public void setModified(boolean modified) {
	mModified = modified;
    }

    /**
     * @param costType the costType to set
     */
    public void setCostType(String costType) {
	mCostType += " - " + costType;
    }

    /**
     * @return the costType
     */
    public String getCostType() {
	return mCostType;
    }

}
